home *** CD-ROM | disk | FTP | other *** search
- on enterFrame
- global gCheckFloppyFlag, gDataPath, gDelimiter, gFloppyPath, gInitPath, gTeacherCD, gDatabaseExists, gFolderName, gFileName, gClassFloat, gClassCount, gCurrentComponent, gInText, gIntLastComponent
- case gCheckFloppyFlag of
- (-999):
- if readText(gInitPath) <> 0 then
- set returncode to -1
- end if
- if returncode = 0 then
- if gTeacherCD = 0 then
- case gDatabaseExists of
- 0:
- if the platform contains "Windows" then
- set gDataPath to "A:"
- else
- set gDataPath to floppyName()
- end if
- set floppyfoundflag to verifyFloppy(gDataPath & gDelimiter, 0)
- if floppyfoundflag = 1 then
- set gDataPath to gDataPath & gDelimiter & "EAPScore" & gDelimiter
- set floppyfoundflag to verifyFloppy(gDataPath & "Class" & gDelimiter & "Token", 1)
- end if
- if floppyfoundflag = 0 then
- set returncode to -3
- end if
- 1:
- set gDataPath to line 2 of gInText & "eapscore" & gDelimiter
- end case
- set gFolderName to "Class"
- set gFileName to "Token"
- readText(gDataPath)
- if readText(gDataPath) <> 0 then
- set returncode to -2
- else
- set classToken to EMPTY
- set tokenLine to gInText
- do("set classToken = " & tokenLine)
- set gClassFloat to integer(getAt(classToken, 1))
- set gClassCount to integer(getAt(classToken, 2))
- end if
- end if
- if returncode = 0 then
- loadClass()
- repeat with counter = 44 to 48
- set the visible of sprite counter to 0
- end repeat
- initializePassword()
- puppetSprite(43, 1)
- swapCast(43, "RemoveCoverup")
- end if
- end if
- if returncode <> 0 then
- set gCurrentComponent to gIntLastComponent
- forget(logonWindow)
- else
- go("Class List")
- end if
- 0:
- set gCheckFloppyFlag to -999
- 1, 9:
- set gCheckFloppyFlag to 0
- 18, 27:
- set gCheckFloppyFlag to -999
- 36, 45:
- set gCheckFloppyFlag to -999
- otherwise:
- set gCheckFloppyFlag to gCheckFloppyFlag - 1
- go(the frame)
- end case
- end
-
- on exitFrame
- go(the frame)
- end
-